const crypto = require('crypto')
const BaseService = require('./base')
const utils = require('../utils')
const db = require('../utils/db')

module.exports = class UserService extends BaseService {
    async getLoginInfo (userId) {
        // todo
        return {}
    }

    async login (username, password) {
        // todo
    }

    async createSalt () {
        return crypto.randomBytes(32).toString('base64')
    }

    async createPassword (password, salt) {
        return utils.md5(salt + password + salt)
    }
}
